Skip to content

feat: add mentions command and search pagination#197

Open
gnapse wants to merge 2 commits intomainfrom
ernesto/mentions-fetch
Open

feat: add mentions command and search pagination#197
gnapse wants to merge 2 commits intomainfrom
ernesto/mentions-fetch

Conversation

@gnapse
Copy link
Copy Markdown
Collaborator

@gnapse gnapse commented Apr 28, 2026

This adds a dedicated tw mentions command for fetching content that mentions the current user, with the same filters and output modes as search plus an --all option to walk every results page.

Mentions were previously only reachable through tw search --mention-me, which still required a query string and left full backlog traversal to manual cursor handling.

The change also refactors shared search plumbing so tw search reuses the same resolver and output path, while the CLI docs and generated Twist skill content now advertise both tw mentions and tw search --all.

Validation: npm test, npx vitest run src/commands/search.test.ts src/commands/mentions.test.ts, npm run type-check, npm run lint:check, and npm run check:skill-sync.

@gnapse gnapse force-pushed the ernesto/mentions-fetch branch from f541447 to c64a411 Compare April 28, 2026 22:01
@gnapse gnapse changed the title [codex] add mentions command and search pagination feat: add mentions command and search pagination Apr 28, 2026
@gnapse gnapse marked this pull request as ready for review April 28, 2026 22:05
@gnapse gnapse requested a review from scottlovegrove April 28, 2026 22:05
@gnapse gnapse self-assigned this Apr 28, 2026
@gnapse gnapse added the 👀 Show PR PR must be reviewed before or after merging label Apr 28, 2026
Copy link
Copy Markdown
Member

@doistbot doistbot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This introduces the tw mentions command alongside new --all pagination for search, cleanly centralizing the underlying search resolution logic. Reusing the output path effectively enhances the maintainability of the CLI's search capabilities. A few adjustments are needed to ensure empty result sets still return valid structured objects in JSON and NDJSON modes, and to deduplicate the shared search CLI flags to prevent future drift between the commands.

Share FeedbackReview Logs

Comment thread src/lib/search-command.ts Outdated
Comment thread src/commands/mentions.ts Outdated
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

👀 Show PR PR must be reviewed before or after merging

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants